import {getFileActivity} from '../../utils/nc/activity'
import {description, path, request, summary, tagsAll} from "koa-swagger-decorator-fork";

@tagsAll(['ActivityFile'])
export default class ActivityFileRouter {
    @request('GET', '/files/activities/{id}')
    @summary('get file activities by file id')
    @path({ id: { type: 'string', required: true } })
    @description('查询文件历史版本')
    static async getFileActivity(ctx) {
        let result = await getFileActivity(ctx.client,ctx.user,ctx.params.id)
        ctx.body = result
    }
}
